﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Crear autores.aspx.vb" Inherits="Libreria.Formulario_web116" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
    .style1
    {
        width: 100%;
    }
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:FormView ID="FormView1" runat="server" BackColor="White" 
    BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
    DataKeyNames="au_id" DataSourceID="SqlDataSource1" DefaultMode="Insert" 
    GridLines="Horizontal">
    <EditItemTemplate>
        au_id:
        <asp:Label ID="au_idLabel1" runat="server" Text='<%# Eval("au_id") %>' />
        <br />
        au_lname:
        <asp:TextBox ID="au_lnameTextBox" runat="server" 
            Text='<%# Bind("au_lname") %>' />
        <br />
        au_fname:
        <asp:TextBox ID="au_fnameTextBox" runat="server" 
            Text='<%# Bind("au_fname") %>' />
        <br />
        phone:
        <asp:TextBox ID="phoneTextBox" runat="server" Text='<%# Bind("phone") %>' />
        <br />
        address:
        <asp:TextBox ID="addressTextBox" runat="server" Text='<%# Bind("address") %>' />
        <br />
        city:
        <asp:TextBox ID="cityTextBox" runat="server" Text='<%# Bind("city") %>' />
        <br />
        state:
        <asp:TextBox ID="stateTextBox" runat="server" Text='<%# Bind("state") %>' />
        <br />
        zip:
        <asp:TextBox ID="zipTextBox" runat="server" Text='<%# Bind("zip") %>' />
        <br />
        contract:
        <asp:CheckBox ID="contractCheckBox" runat="server" 
            Checked='<%# Bind("contract") %>' />
        <br />
        <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
            CommandName="Update" Text="Actualizar" />
        &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
            CausesValidation="False" CommandName="Cancel" Text="Cancelar" />
    </EditItemTemplate>
    <EditRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
    <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
    <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
    <InsertItemTemplate>
        &nbsp;<table class="style1">
            <tr>
                <td>
                    au_id:</td>
                <td>
                    <asp:TextBox ID="au_idTextBox" runat="server" Text='<%# Bind("au_id") %>' />
                </td>
            </tr>
            <tr>
                <td>
                    au_lname:</td>
                <td>
                    <asp:TextBox ID="au_lnameTextBox" runat="server" 
                        Text='<%# Bind("au_lname") %>' />
                </td>
            </tr>
            <tr>
                <td>
                    au_fname:</td>
                <td>
                    <asp:TextBox ID="au_fnameTextBox" runat="server" 
                        Text='<%# Bind("au_fname") %>' />
                </td>
            </tr>
            <tr>
                <td>
                    phone:
                </td>
                <td>
                    <asp:TextBox ID="phoneTextBox" runat="server" Text='<%# Bind("phone") %>' />
                </td>
            </tr>
            <tr>
                <td>
                    address:</td>
                <td>
                    <asp:TextBox ID="addressTextBox" runat="server" Text='<%# Bind("address") %>' />
                </td>
            </tr>
            <tr>
                <td>
                    city:</td>
                <td>
                    <asp:TextBox ID="cityTextBox" runat="server" Text='<%# Bind("city") %>' />
                </td>
            </tr>
            <tr>
                <td>
                    state:</td>
                <td>
                    <asp:TextBox ID="stateTextBox" runat="server" Text='<%# Bind("state") %>' />
                </td>
            </tr>
            <tr>
                <td>
                    zip:</td>
                <td>
                    <asp:TextBox ID="zipTextBox" runat="server" Text='<%# Bind("zip") %>' />
                </td>
            </tr>
            <tr>
                <td>
                    contract:</td>
                <td>
                    <asp:CheckBox ID="contractCheckBox" runat="server" 
                        Checked='<%# Bind("contract") %>' />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                        CommandName="Insert" Text="Insertar" />
                </td>
                <td>
                    <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" 
                        CommandName="Cancel" Text="Cancelar" />
                </td>
            </tr>
        </table>
        <br />
        &nbsp;<br />&nbsp;<br />
<br />
        &nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />
    </InsertItemTemplate>
    <ItemTemplate>
        au_id:
        <asp:Label ID="au_idLabel" runat="server" Text='<%# Eval("au_id") %>' />
        <br />
        au_lname:
        <asp:Label ID="au_lnameLabel" runat="server" Text='<%# Bind("au_lname") %>' />
        <br />
        au_fname:
        <asp:Label ID="au_fnameLabel" runat="server" Text='<%# Bind("au_fname") %>' />
        <br />
        phone:
        <asp:Label ID="phoneLabel" runat="server" Text='<%# Bind("phone") %>' />
        <br />
        address:
        <asp:Label ID="addressLabel" runat="server" Text='<%# Bind("address") %>' />
        <br />
        city:
        <asp:Label ID="cityLabel" runat="server" Text='<%# Bind("city") %>' />
        <br />
        state:
        <asp:Label ID="stateLabel" runat="server" Text='<%# Bind("state") %>' />
        <br />
        zip:
        <asp:Label ID="zipLabel" runat="server" Text='<%# Bind("zip") %>' />
        <br />
        contract:
        <asp:CheckBox ID="contractCheckBox" runat="server" 
            Checked='<%# Bind("contract") %>' Enabled="false" />
        <br />
        <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" 
            CommandName="Edit" Text="Editar" />
        &nbsp;<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" 
            CommandName="Delete" Text="Eliminar" />
        &nbsp;<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" 
            CommandName="New" Text="Nuevo" />
    </ItemTemplate>
    <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
    <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConflictDetection="CompareAllValues" 
    ConnectionString="<%$ ConnectionStrings:pubsConnectionString7 %>" 
    DeleteCommand="DELETE FROM [authors] WHERE [au_id] = @original_au_id AND [au_lname] = @original_au_lname AND [au_fname] = @original_au_fname AND [phone] = @original_phone AND (([address] = @original_address) OR ([address] IS NULL AND @original_address IS NULL)) AND (([city] = @original_city) OR ([city] IS NULL AND @original_city IS NULL)) AND (([state] = @original_state) OR ([state] IS NULL AND @original_state IS NULL)) AND (([zip] = @original_zip) OR ([zip] IS NULL AND @original_zip IS NULL)) AND [contract] = @original_contract" 
    InsertCommand="INSERT INTO [authors] ([au_id], [au_lname], [au_fname], [phone], [address], [city], [state], [zip], [contract]) VALUES (@au_id, @au_lname, @au_fname, @phone, @address, @city, @state, @zip, @contract)" 
    OldValuesParameterFormatString="original_{0}" 
    SelectCommand="SELECT * FROM [authors]" 
    UpdateCommand="UPDATE [authors] SET [au_lname] = @au_lname, [au_fname] = @au_fname, [phone] = @phone, [address] = @address, [city] = @city, [state] = @state, [zip] = @zip, [contract] = @contract WHERE [au_id] = @original_au_id AND [au_lname] = @original_au_lname AND [au_fname] = @original_au_fname AND [phone] = @original_phone AND (([address] = @original_address) OR ([address] IS NULL AND @original_address IS NULL)) AND (([city] = @original_city) OR ([city] IS NULL AND @original_city IS NULL)) AND (([state] = @original_state) OR ([state] IS NULL AND @original_state IS NULL)) AND (([zip] = @original_zip) OR ([zip] IS NULL AND @original_zip IS NULL)) AND [contract] = @original_contract">
    <DeleteParameters>
        <asp:Parameter Name="original_au_id" Type="String" />
        <asp:Parameter Name="original_au_lname" Type="String" />
        <asp:Parameter Name="original_au_fname" Type="String" />
        <asp:Parameter Name="original_phone" Type="String" />
        <asp:Parameter Name="original_address" Type="String" />
        <asp:Parameter Name="original_city" Type="String" />
        <asp:Parameter Name="original_state" Type="String" />
        <asp:Parameter Name="original_zip" Type="String" />
        <asp:Parameter Name="original_contract" Type="Boolean" />
    </DeleteParameters>
    <InsertParameters>
        <asp:Parameter Name="au_id" Type="String" />
        <asp:Parameter Name="au_lname" Type="String" />
        <asp:Parameter Name="au_fname" Type="String" />
        <asp:Parameter Name="phone" Type="String" />
        <asp:Parameter Name="address" Type="String" />
        <asp:Parameter Name="city" Type="String" />
        <asp:Parameter Name="state" Type="String" />
        <asp:Parameter Name="zip" Type="String" />
        <asp:Parameter Name="contract" Type="Boolean" />
    </InsertParameters>
    <UpdateParameters>
        <asp:Parameter Name="au_lname" Type="String" />
        <asp:Parameter Name="au_fname" Type="String" />
        <asp:Parameter Name="phone" Type="String" />
        <asp:Parameter Name="address" Type="String" />
        <asp:Parameter Name="city" Type="String" />
        <asp:Parameter Name="state" Type="String" />
        <asp:Parameter Name="zip" Type="String" />
        <asp:Parameter Name="contract" Type="Boolean" />
        <asp:Parameter Name="original_au_id" Type="String" />
        <asp:Parameter Name="original_au_lname" Type="String" />
        <asp:Parameter Name="original_au_fname" Type="String" />
        <asp:Parameter Name="original_phone" Type="String" />
        <asp:Parameter Name="original_address" Type="String" />
        <asp:Parameter Name="original_city" Type="String" />
        <asp:Parameter Name="original_state" Type="String" />
        <asp:Parameter Name="original_zip" Type="String" />
        <asp:Parameter Name="original_contract" Type="Boolean" />
    </UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
